package com.aysafety.iotdataplatformserver.listener;

import java.io.IOException;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.aysafety.core.DBDriver.hbase.HBaseDriver;
import com.aysafety.core.model.NaturalGasModel;

// 天然气
@Component
public class NaturalGasListener {

    private final String type = "NaturalGas";

    private final String tableName = "NaturalGasRealTime";

    private final String[] structure = new String[] {"NaturalGas"};

    @Autowired
    KsTreeDataListener ksTreeDataListener;

    public void start(Map<String, Object> result) {
        this.transformData(result);
    }

    public NaturalGasModel transformData(Map<String, Object> result) {
        return null;
    }

    public boolean createTable() throws IOException {
        return HBaseDriver.createTable(this.tableName, this.structure);
    }
}
